﻿using System;
using System.Collections.Generic;
using System.Text;
using SchEdu.Framework.DataModel;
using SchEdu.Framework.Exceptions;

namespace SchEdu.Framework.Validators
{
    public class SchEduDataValidator : Validator
    {
        public SchEduDataValidator(SchEduData schEduData)
            : base(schEduData)
        {
        }

        #region IValidator Members

        public override void Validate()
        {
            if (SchEduData == null)
            {
                throw new ValidatorException(string.Format(Resources.SchEduDataCannotBeNull));
            }
            if (SchEduData.SchEduDataSet == null)
            {
                throw new ValidatorException(string.Format(Resources.SchEduDataSetCannotBeNull));
            }
        }

        #endregion
    }
}
